var gulp = require('gulp');
var px2rem = require('gulp-px2rem');
var watch = require('gulp-watch');

gulp.task('default', function() {
  // 将你的默认的任务代码放在这
});

var px2remOptions = {
  replace: false,
  rootValue: 37.5,
};


gulp.task('watch', function () {
  // Callback mode, useful if any plugin in the pipeline depends on the `end`/`flush` event
  gulp.watch('./game/**/*.css', ['cssToRem']);
});
 
gulp.task('cssToRem', function() {
    gulp.src('game/css/*.css')
        .pipe(px2rem(px2remOptions))
        .pipe(gulp.dest('game/rem'));
});